package com.lancoo.znbkxx.teacher.service

import com.lancoo.znbkxx.teacher.model.data.*
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * @author : Admin
 * @date   : 2019/7/22 21:02
 * @desc   :
 */
interface PaperService {
    @GET("Paper/GetPaperForMobileSearch")
    suspend fun getPaperForMobileSearch(
            @Query("UserID") UserID: String,
            @Query("Token") Token: String,
            @Query("SchoolID") SchoolID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("Layer") Layer: String,
            @Query("SearchInfo") SearchInfo: String,
            @Query("LowDateTime") LowDateTime: Long,
            @Query("HighDateTime") HighDateTime: Long,
            @Query("State") State: String,
            @Query("PageNumber") PageNumber: Int,
            @Query("PageSize") PageSize: Int
    ): ZnbkResponse<SearchPaperList>

    @GET("Paper/GetPaperSetListForMobile")
    suspend fun getPaperSetListForMobile(
            @Query("UserID") UserID: String,
            @Query("Token") Token: String,
            @Query("SchoolID") SchoolID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("Layer") Layer: Int,
            @Query("PageNumber") PageNumber: Int,
            @Query("PageSize") PageSize: Int
    ): ZnbkResponse<PaperList>

    /*获取主界面信息*/
    @GET("W_ZNBK_GetPaperSetForMobileTerminal")
    suspend fun getPaperSetForMobileTerminal(
            @Query("Key") Key: String,
            @Query("SubjectID") SubjectID: String,
            @Query("GlobalGrade") GlobalGrade: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("TID") TID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Layer") Layer: Int,
            @Query("SearchInfo") SearchInfo: String,
            @Query("State") State: String,
            @Query("DateField") DateField: String,
            @Query("PageNumber") PageNumber: Int,
            @Query("PageSize") PageSize: Int
    ): ZnbkResponse<PaperList>

    @GET("W_ZNBK_GetPaperForMobileSearch")
    suspend fun getPaperForMobileSearch(
            @Query("Key") Key: String,
            @Query("SubjectID") SubjectID: String,
            @Query("GlobalGrade") GlobalGrade: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("TID") TID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Layer") Layer: String,
            @Query("SearchInfo") SearchInfo: String,
            @Query("State") State: String,
            @Query("DateField") DateField: String,
            @Query("PageNumber") PageNumber: Int,
            @Query("PageSize") PageSize: Int
    ): ZnbkResponse<SearchPaperList>

    @POST("Paper/GetReleaseEffective")
    suspend fun releaseAuditPaper(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Body requestBody: RequestBody
    ): ZnbkResponse<ReleaseInfo>

    @GET("W_ZNBK_GetDataAnalyze")
    suspend fun getDataAnalyze(
            @Query("CourseClassID") CourseClassID: String,
            @Query("Key") Key: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Token") token: String,
            @Query("UserID") userID: String
    ): ZnbkResponse<AnalysisInfo>

    @GET("Paper/SetPaperAnswerDuration")
    suspend fun setPaperAnswerDuration(
            @Query("PaperID") PaperID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("StartTime") StartTime: String,
            @Query("EndTime") EndTime: String,
            @Query("Token") Token: String,
            @Query("SchoolID") SchoolID: String,
            @Query("SetID") SetID: String,
            @Query("GlobalGrade") GlobalGrade: String,
            @Query("UserID") UserID: String
    ): ZnbkResponse<Boolean>

    @GET("Paper/GetStuProgress")
    suspend fun getStuProgress(
            @Query("PaperID") PaperID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Token") Token: String,
            @Query("UserId") UserID: String
    ): ZnbkResponse<MutableList<StuProgressInfo>>

    @GET("W_ZNBK_GetPaperFlagForClass")
    suspend fun getPaperFlagForClass(
            @Query("GlobalGrade") GlobalGrade: String,
            @Query("Key") Key: String,
            @Query("Layer") Layer: String,
            @Query("SchoolID") SchoolID: String,
            @Query("SetID") SetID: String,
            @Query("PaperID") PaperID: String,
            @Query("Token") Token: String,
            @Query("UserID") UserID: String
    ): ZnbkResponse<MutableList<ClassFlag>>

    @GET("CourseClass/GetGradeClassWithPaperState")
    suspend fun getGradeClassWithPaperState(
            @Query("GlobalGrade") GlobalGrade: String,
            @Query("SchoolID") SchoolID: String,
            @Query("SetID") SetID: String,
            @Query("PaperID") PaperID: String,
            @Query("Token") Token: String,
            @Query("UserID") UserID: String
    ): ZnbkResponse<MutableList<ClassFlag>>

    @GET("StuInfo/GetStuRZInfo")
    suspend fun getStuRZInfo(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("SchoolID") SchoolID: String
    ): ZnbkResponse<RZInfo>

    @GET("PaperInfo/PreviewStuHomeworkInfo")
    suspend fun previewStuHomeworkInfo(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Layer") Layer: Int
    ): ZnbkResponse<PreviewStuHomeworkInfo>

    @GET("StuMainInterface/GetStuNewTask")
    suspend fun getStuNewTask(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("PageIndex") PageIndex: Int,
            @Query("PageSize") PageSize: Int
    ): ZnbkResponse<MutableList<NewTask>>

    @GET("PaperInfo/GetPaperBaseInfoList")
    suspend fun getPaperBaseInfoList(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Layer") Layer: Int,
            @Query("PageIndex") PageIndex: Int,
            @Query("PageSize") PageSize: Int,
            @Query("State") State: Int,
            @Query("SearchType") SearchType: Boolean
    ): ZnbkResponse<PaperBaseInfoList>

    @GET("PaperInfo/PublishPaper")
    suspend fun publishPaper(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("PaperID") PaperID: String,
            @Query("SchoolID") SchoolID: String
    ): ZnbkResponse<Boolean>

    @GET("Common/GetTeacherInfo")
    suspend fun getTeacherInfo(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String
    ): ZnbkResponse<TeacherInfo>

    @GET("PaperInfo/GetHomeworkStatisticAnalysis")
    suspend fun getHomeworkStatisticAnalysis(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("SchoolID") SchoolID: String
    ): ZnbkResponse<MutableList<HomeWorkAnalysis>>

    @GET("HastenCall/DoHastenCall")
    suspend fun doHastenCallOneOnOne(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("PaperID") PaperID: String,
            @Query("SchoolID") SchoolID: String): ZnbkResponse<Int>

    @GET("Paper/DoHastenCall")
    suspend fun doHastenCall(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("PaperID") PaperID: String,
            @Query("SetID") SetID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("PaperName") PaperName: String,
            @Query("SchoolID") SchoolID: String): ZnbkResponse<Int>

    @GET("CourseClassAnalyze/GetEffectivenessEvaluation")
    suspend fun getEffectivenessEvaluation(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("CourseClassID") CourseClassID: String
    ): ZnbkResponse<PaperEffectiveInfo>

    @GET("Paper/GetMobilePaperList")
    suspend fun getMobilePaperList(
            @Query("CourseClassID") CourseClassID: String,
            @Query("IsRelease") IsRelease: Int,
            @Query("IsCompleted") IsCompleted: Int,
            @Query("Layer") Layer: Int,
            @Query("PageNumber") PageNumber: Int,
            @Query("PageSize") PageSize: Int,
            @Query("SchoolID") SchoolID: String,
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("SearchInfo") SearchInfo: String
    ): ZnbkResponse<PaperTrailInfo>

    @GET("Paper/GetPaperList")
    suspend fun getPaperList(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("PaperType")PaperType:String,
            @Query("SchoolID") SchoolID: String,
            @Query("PageIndex")PageIndex:Int,
            @Query("PageSize")PageSize:Int,
            @Query("SearchText")SearchText:String,
            @Query("StageNo")StageNo:String
    ): ZnbkResponse<PaperLibrary>

    @GET("PaperSet/GetClassLayerPaperCount")
    suspend fun getClassLayerPaperCount(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("Layer") Layer: Int
    ): ZnbkResponse<PaperLayerInfo>
}